package com.hl.shifangzhiyu.web;

import com.hl.shifangzhiyu.pojo.OnlineClass;
import com.hl.shifangzhiyu.service.OnlineClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OnlineClass")
public class OnlineClassController {
    @Autowired
    private OnlineClassService onlineClassService;

    @RequestMapping("/select")
    public List<OnlineClass> selectClass(){
        return onlineClassService.selectClass();
    }

    @RequestMapping("/sort01")
    public List<OnlineClass> sortBySmall(){
        return onlineClassService.selectSortBySmall();
    }

    @RequestMapping("/sort02")
    public List<OnlineClass> sortByBig(){
        return onlineClassService.selectSortByBig();
    }

    @RequestMapping("/select01")
    public List<OnlineClass> selectByprice01(){
        return onlineClassService.selectByprice01();
    }

    @RequestMapping("/select02")
    public List<OnlineClass> selectByprice02(){
        return onlineClassService.selectByprice02();
    }

    @RequestMapping("/select03")
    public List<OnlineClass> selectByprice03(){
        return onlineClassService.selectByprice03();
    }

    @RequestMapping("/select04")
    public List<OnlineClass> selectByprice04(){
        return onlineClassService.selectByprice04();
    }

    @RequestMapping("/select05")
    public List<OnlineClass> selectByprice05(){
        return onlineClassService.selectByprice05();
    }

    @RequestMapping("/select06")
    public List<OnlineClass> selectByprice06(){
        return onlineClassService.selectByprice06();
    }
}
